package jp.ac.u_tokyo.dch.util.common;

import java.util.List;
import java.util.Map;

import jp.ac.u_tokyo.dch.dao.psi.PsiInterfaceDao;
import jp.ac.u_tokyo.dch.model.db.Data;
import jp.ac.u_tokyo.dch.model.xml.psi.PsiObject;
import jp.ac.u_tokyo.dch.util.PageUtil;

/**
 * @version 1.1
 */
public class PsiPageUtil extends PageUtil<PsiObject> {

	@Override
	protected int getSearchResultCnt(Map<String, String> searchKeyMap) throws Exception {

		PsiInterfaceDao psiInterfaceDao = new PsiInterfaceDao();

		return psiInterfaceDao.getSearchResultCnt(searchKeyMap);
	}

	@Override
	protected List<PsiObject> getSearchResultList(int start, int viewPageCnt, Map<String, String> searchKeyMap) throws Exception {

		PsiInterfaceDao psiInterfaceDao = new PsiInterfaceDao();

		return psiInterfaceDao.getSearchResult(start, viewPageCnt, searchKeyMap);
	}


}
